package com.pool;

import javax.swing.JFrame;

public class Window {
	
	private final static String WINDOW_NAME = "Pool";
	private Renderer renderer;

	public Window() {
		JFrame window = new JFrame(WINDOW_NAME);
		window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		renderer = new Renderer();
		window.getContentPane().add(renderer);
		
		window.pack();
		window.setVisible(true);
	}
	
	/*
	 * 
	 *  Invalidate window to trigger re-rendering. 
	 *  
	 */
	
	public void invalidate() {
		renderer.invalidate();
	}

}
